# -*- coding:utf-8 -*-

import time
from selenium import webdriver

driver = webdriver.Chrome()
driver.maximize_window()
driver.get('http://www.baidu.com')
time.sleep(2)
try:
    picture_url = driver.get_screenshot_as_file('F:\\Users\\picture\\baidu.png')
    print('截图成功')
except BaseException as msg:
    print(msg)
driver.quit()
